{include file="header.html"}
<script>
$(function(){
	$('#add_time_from').datepicker({dateFormat: 'yy-mm-dd'});
    $('#add_time_to').datepicker({dateFormat: 'yy-mm-dd'});
	
	$('*[ectype=recharge_verify]').click(function(){
		if(!window.confirm('{$lang.confirm_pay}')){
        	return;
    	}
		tradesn = $(this).parent().parent().find('input').val();
    	$.getJSON('index.php?app=deposit&act=recharge_verify&tradesn=' + tradesn, function(result){
        	if(result.done){
            	alert(result.msg);
				window.location.reload();
        	}else{
            	alert(result.msg);
        	}
    	});
	});
});
</script>

<div id="rightTop">
  <p>{$lang.deposit_manage}</p>
  <ul class="subnav">
    <li><a class="btn1" href="index.php?app=deposit">{$lang.manage}</a></li>
    <li><a class="btn1" href="index.php?app=deposit&amp;act=tradelist">{$lang.trade_manage}</a></li>
    <li><a class="btn1" href="index.php?app=deposit&act=drawlist">{$lang.withdraw_manage}</a></li>
    <li><span>{$lang.recharge_manage}</span></li>
    <li><a class="btn1" href="index.php?app=deposit&amp;act=setting">{$lang.system_setting}</a></li>
  </ul>
</div>

<div class="mrightTop">
   <div class="fontl">
        <form method="get">
             <div class="left">
                <input type="hidden" name="app" value="deposit" />
                <input type="hidden" name="act" value="rechargelist" />
                <select class="querySelect" name="field">{html_options options=$search_options selected=$smarty.get.field}
                </select>:<input class="queryInput" type="text" name="search_name" value="{$smarty.get.search_name}" />
                <select class="querySelect" name="status">
                    <option value="">{$lang.trade_status}</option>
                    {html_options options=$status_list selected=$smarty.get.status}
                </select>
                {$lang.recharge_method}:
                <select class="querySelect" name="is_online">
                    <option value="">{$lang.no_limit}</option>
                    {html_options options=$recharge_method selected=$smarty.get.is_online}
                </select>
                {$lang.add_time_from}:<input class="queryInput2" type="text" value="{$query.add_time_from}" id="add_time_from" name="add_time_from" class="pick_date" />
                {$lang.to}:<input class="queryInput2" type="text" value="{$query.add_time_to}" id="add_time_to" name="add_time_to" class="pick_date" />
                {$lang.amount_from}:<input class="queryInput2" type="text" value="{$query.amount_from}" name="amount_from" />
                {$lang.to}:<input class="queryInput2" type="text" style="width:60px;" value="{$query.amount_to}" name="amount_to" class="pick_date" />
                <input type="submit" class="formbtn" value="{$lang.query}" />
            </div>
            <!--{if $filtered}-->
            <a class="left formbtn1" href="index.php?app=deposit&act=rechargelist">{$lang.cancel_query}</a>
            <!--{/if}-->
        </form>
    </div>
  <div class="fontr">{include file=page.top.html}</div>
</div>
<div class="tdare">
  <form method=get>
  <table width="100%" cellspacing="0" class="dataTable">
    <!--{if $rechargelist}-->
    <tr class="tatr1">
      <td width="20" class="firstCell"><input type="checkbox" class="checkall" /></td>
      <td>流水号</td>
      <td>用户</td>
      <td>创建时间</td>
      <td>名称</td>
      <td>充值方式</td>
      <td>金额(元)</td>
      <td>充值信息</td>
      <td>审批员</td>
      <td>状态</td>
      <td class="handler">审核</td>
    </tr>
    <!--{/if}-->
    <!--{foreach from=$rechargelist item=recharge}-->
    <tr class="tatr2">
      <td class="firstCell"><input type="checkbox" class="checkitem" value="{$recharge.tradesn}" /></td>
      <td>{$recharge.tradesn}</td>
      <td>{$recharge.user_name}</td>
      <td>{$recharge.add_time|date:Y.m.d H.i.s}</td>
      <td>{$lang.recharge}</td>
      <td>{if $recharge.is_online}{$lang.online}{else}{$lang.offline}{/if}</td>
      <td>{$recharge.amount}</td>
      <td>{$recharge.extra.payway}
        {if !$recharge.is_online}
        <span class="gray">( {$recharge.extra.account_name},{$recharge.extra.num} )</span>
        {/if}
      </td>
      <td>{$recharge.examine}</td>
      <td><span style="color:{if $recharge.status eq 'WAIT_ADMIN_VERIFY' || $recharge.status eq 'PENDING'}#f60{else}#2F792E{/if}">{$recharge.status_label}</span></td>
      <td class="handler">
      	<!-- {if $recharge.status eq 'SUCCESS'} -->
        <img src="{res file=style/images/positive_enabled.gif}" />
        <!--{else}-->
        <a href="javascript:;" ectype="recharge_verify"><img src="{res file=style/images/positive_disabled.gif}" /></a>
        <!-- {/if} -->
      </td>
    </tr>
    <!--{foreachelse}-->
    <tr class="no_data">
      <td colspan="10">{$lang.no_data}</td>
    </tr>
    <!--{/foreach}-->
  </table>
  </form>
  <!--{if $rechargelist}-->
  <div id="dataFuncs">
    <div id="batchAction" class="left paddingT15"> &nbsp;&nbsp;
      <input class="formbtn batchButton" type="button" value="{$lang.drop}" name="id" uri="index.php?app=deposit&act=drop_recharge" presubmit="confirm('{$lang.drop_confirm}');" />
    </div>
    <div class="pageLinks">{include file=page.bottom.html}</div>
    <div class="clear"></div>
  </div>
  <!--{/if}-->
</div>
{include file="footer.html"} 